﻿using System;
using RSSNewsGrabberModule.Interfaces;

namespace RSSNewsGrabberModule.Converters
{
    public class DateTimeConverter : IConverter
    {
        public object Convert(object source, params object[] additionalParams)
        {
            var data = (string)source;
            DateTime result;
            if (DateTime.TryParse(data, out result))
                return result;
            return null;
        }
    }
}
